package com.qdlc.p2p.dal.model;

import java.util.HashMap;
import java.util.Map;

import com.qdlc.p2p.common.util.PropertiesUtil;
import com.qdlc.p2p.common.util.StringUtil;
import com.qdlc.p2p.dal.model.BorrowModel;

public class AppBorrowModel extends BorrowModel{

	private Map<String,Object> data;
	
	/**
	 * 标的投资记录参数校验
	 * @return
	 */
	public Map<String,Object> validParam(){
		if(StringUtil.isBlank(getBorrowId()) || getBorrowId() < 1){
			data = new HashMap<String,Object>();
			data.put("resCode", "0");
			data.put("resMsg", PropertiesUtil.getValue("AppInvest01"));
			return data;
		}
		if(StringUtil.isBlank(getPage()) || getPage() < 1){
			data = new HashMap<String,Object>();
			data.put("resCode", "0");
			data.put("resMsg", PropertiesUtil.getValue("AppInvest02"));
			return data;
		}
		return null;
	}
	
}
